#include<stdio.h>
double len(double x1,double x2,double x3,double x4)
{
  double y1,y2,y3,y4;
  if(x1 > x2) {y2 = x1;y1 = x2;} else {y1 = x1;y2 = x2;}
  if(x3 > x4) {y3 = x4;y4 = x3;} else {y3 = x3;y4 = x4;}
  if(y2 < y3||y4 < y1) return 0;
  else 
  {
    if((y1 <= y3&&y3 < y2&&y2 < y4)||(y1 < y3&&y3 < y2&&y2 <= y4)||(y1 <= y3&&y3 < y2&&y2 <= y4)) return (y2 - y3);
    else if(y1 <= y3&&y4 <= y2) return (y4 - y3);
    else if((y3 <= y1&&y1 < y4&&y4 < y2)||(y3 < y1&&y1 < y4&&y4 <= y2)||(y3 <= y1&&y1 < y4&&y4 <= y2)) return (y4 - y1);
    else if(y3 <= y1&&y2 <= y4) return (y2 - y1);
    else return 0;
  }
}
int main()
{
  double x1,x2,x3,x4,y1,y2,y3,y4,lx,ly;
  while(scanf("%lf%lf%lf%lf%lf%lf%lf%lf",&x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4) != EOF)
  {
    lx = len(x1,x2,x3,x4);
    if(lx == 0) printf("0.00\n");
    else 
    {
        ly = len(y1,y2,y3,y4);
        if(ly == 0) printf("0.00\n");
        else
          printf("%.2lf\n",lx*ly);
    }
  }
  return 0;
}